<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>JSON理解</title>
</head>

<body>
    <script>
        var obj = {
            name: '美羊羊',
            age: '18',
        };
        console.log(obj);
        var a = JSON.stringify(obj);
        console.log(a);
        var b = JSON.parse(a);
        console.log(b);
    </script>
</body>

</html>